import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/Home.vue'
Vue.use(VueRouter)

  const routes = [
    {
      path:"/",
      redirect:'/index'
    },
    {
      path:"/upload" ,
      component:() => import("../views/upload.vue")
    },
    {
      path:"/swriper" ,
      component:() => import("../views/swriper.vue")
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      children: [
        {
          path:"/soves",
          name:"soves",
          component:() =>import("../views/soves.vue")
        },
        {
          path:"/index",
          name:'index',
          component:() => import("../views/index.vue")
        },
        {
          path:"/product",
          name:"product",
          component:() => import("../views/product.vue")
        },
        {
          path:'/us',
          component:() => import("../views/us.vue")
        },
        {
          path:"/*",
          name:"404",
          component:() => import("../views/404.vue")
        },
      ]
    }
  
]

const router = new VueRouter({
  routes
})


export default router
